import request from '@/utils/request'

// 获取图形验证码接口
export const code = () => {
  return request.get('/captcha/image')
}
// 获取验证码接口
export const sms = (mobile, captchaCode, captchaKey) => {
  return request.post('/captcha/sendSmsCaptcha', {
    form: {
      mobile,
      captchaCode,
      captchaKey
    }
  })
}
// 手机号验证码登录接口
export const login = (mobile) => {
  return request.post('/passport/login', {
    form: {
      isParty: false,
      mobile,
      partyData: {},
      smsCode: 246810
    }
  })
}

// 获取用户信息
export const user = () => {
  return request.get('/user/info')
}
